arc_cosine

This function returns the principal value of the arc cosine of x, expressed in radians.

double arc_cosine(double x)

Parameters:
x
The value to calculate between -1 and 1.

Return value:
Principal arc cosine of x, in the interval [0,pi] radians. If x is outside the valid range, the function will return 0.

Remarks:
In trigonometrics, arc cosine is the inverse operation of cosine.

Example:
void main()
{
alert("arc_cosine test", "Arc Cosine of -1 is "+arc_cosine(-1)+".");
alert("arc_cosine test", "Arc Cosine of 0 is "+arc_cosine(0)+".");
alert("arc_cosine test", "Arc Cosine of 1 is "+arc_cosine(1)+".");
}